1 #include "InputManager.hxx" 2 #include "CoreUtils.hxx" 27 for (std::vector<InputConverter*>::const_iterator it =
_converters.begin(); it !=
_converters.end(); it++) {
56 std::string conv2 = conv;
58 std::cout <<
"InputManager::Initialize(). Input type (oaAnalysisTree, FlatTree, ...) not specified. Find it automatically..." << std::endl;
59 std::string firstFile =
FindFirstFile(infile_name, isROOTFile);
60 for (std::vector<InputConverter*>::const_iterator it =
_converters.begin(); it !=
_converters.end(); it++) {
61 if ((*it)->IsCorrectType(firstFile)) {
62 conv2 = (*it)->Name();
69 std::cerr <<
"ERROR: Unable to find an input converter for your input files - check that your input files are valid!" << std::endl;
75 std::cout <<
"InputManager::Initialize(). Input type is: " << conv2 << std::endl;
88 if (!
ReadFile(infile_name, isROOTFile))
return false;
92 std::cout <<
"InputManager::input tree has " << nentries <<
" entries" << std::endl;
105 std::cout <<
"InputManager:: MC mode" << std::endl;
107 std::cout <<
"InputManager:: Data mode" << std::endl;
110 std::cout <<
"InputManager:: SoftwareVersion for original file is " <<
GetSoftwareVersion() << std::endl;
119 std::cout <<
"InputManager::IsROOTFile(). If this is not a ROOT file an error will appear in the next two lines. Ignore it !!!! " << std::endl;
121 TString infileName(infile_name);
129 TFile* isROOTFile = TFile::Open(infile_name.c_str());
133 std::cout <<
"InputManager::IsROOTFile(). This is not a ROOT file. Try as a list of ROOT files. " << std::endl;
137 std::cout <<
"InputManager::IsROOTFile(). This is a ROOT file. " << std::endl;
146 TString infileName(infile_name);
147 std::ifstream inputFile(infileName.Data(), std::ios::in);
155 std::string inputString=infile_name;
158 while (inputFile >> inputString) {
173 TString infileName(infile_name);
174 std::ifstream inputFile(infileName.Data(), std::ios::in);
182 std::string inputString=infile_name;
185 inputFile >> inputString;
195 if (ientry < 0)
return false;
202 if (nb <=0 || !SpillToRead){
220 if (ientry < 0)
return false;
227 if (nb <=0 )
return false;
265 if ((*it)->Name() == name){
277 if ((*it)->Name() == conv){
282 std::cout <<
"ERROR: Input Converter '" << conv <<
"' does not exist" << std::endl;
292 std::cout <<
"ERROR: InputConverter " << name <<
" already exists. If you want to replace it please use ReplaceConverter method" << std::endl;
306 if ((*it)->Name() == name){
307 std::cout <<
"Overriding " << name <<
" input converter" << std::endl;
317 std::cout <<
"InputConverter " << name <<
" does not exist. Cannot replace it !!!!!" << std::endl;
virtual AnaSpillC * Clone()=0
Clone this object.
Int_t UniqueID
The event unique ID.