#include <AnalysisHandler.hh>
Definition at line 29 of file AnalysisHandler.hh.
Public Member Functions | |
Constructors and destructors. */ | |
AnalysisHandler (const string &runname="") | |
Preferred constructor, with optional run name. | |
AnalysisHandler (const string &basefilename, const string &runname, HistoFormat storetype=AIDAML) | |
Make a Rivet handler with a set base filename and store type. | |
~AnalysisHandler () | |
Destructor The destructor is not virtual, as this class should not be inherited from. | |
Run properties | |
string | runName () const |
Get the name of this run. | |
size_t | numEvents () const |
double | sumOfWeights () const |
void | setSumOfWeights (const double &sum) |
bool | needCrossSection () const |
Is cross-section information required by at least one child analysis? | |
AnalysisHandler & | setCrossSection (double xs) |
Set the cross-section for the process being generated. | |
double | crossSection () const |
Get the cross-section known to the handler. | |
bool | hasCrossSection () const |
Whether the handler knows about a cross-section. | |
AnalysisHandler & | setRunBeams (const ParticlePair &beams) |
Set beams for this run. | |
const ParticlePair & | beams () const |
Get beam IDs for this run, determined from first event. | |
PdgIdPair | beamIds () const |
Get beam IDs for this run, determined from first event. | |
double | sqrtS () const |
Get energy for this run, determined from first event. | |
Handle analyses | |
std::vector< std::string > | analysisNames () const |
Get a list of the currently registered analyses' names. | |
const std::set< AnaHandle, AnaHandleLess > & | analyses () const |
Get the collection of currently registered analyses. | |
AnalysisHandler & | addAnalysis (const std::string &analysisname) |
AnalysisHandler & | removeAnalysis (const std::string &analysisname) |
Remove an analysis from the run list using its name. | |
AnalysisHandler & | addAnalyses (const std::vector< std::string > &analysisnames) |
AnalysisHandler & | removeAnalyses (const std::vector< std::string > &analysisnames) |
Remove analyses from the run list using their names. | |
AnalysisHandler & | addAnalysis (Analysis *analysis) |
Add an analysis to the run list by object. | |
AnalysisHandler & | removeIncompatibleAnalyses (const PdgIdPair &beams) |
Main init/execute/finalise | |
void | init () |
void | init (const GenEvent &event) |
Initialize a run, with the run beams taken from the example event. | |
void | analyze (const GenEvent &event) |
void | finalize () |
AIDA factories etc. | |
AIDA::IAnalysisFactory & | analysisFactory () |
void | commitData () |
void | writeData (const std::string &filename) |
AIDA::ITree & | tree () |
AIDA::IHistogramFactory & | histogramFactory () |
AIDA::IDataPointSetFactory & | datapointsetFactory () |
Private Member Functions | |
void | _setupFactories (const string &basefilename, HistoFormat storetype) |
void | _setupFactories () |
void | _normalizeTree (AIDA::ITree &tree) |
Log & | getLog () |
Get a logger object. | |
AnalysisHandler & | operator= (const AnalysisHandler &) |
AnalysisHandler (const AnalysisHandler &) | |
Private Attributes | |
set< AnaHandle, AnaHandleLess > | _analyses |
The collection of Analysis objects to be used. | |
Run properties | |
std::string | _runname |
Run name. | |
size_t | _numEvents |
Number of events seen. | |
double | _sumOfWeights |
Sum of event weights seen. | |
double | _xs |
Cross-section known to AH. | |
ParticlePair | _beams |
Beams used by this run. | |
bool | _initialised |
Flag to check if init has been called. | |
AIDA factory handles | |
Note that only the analysis factory can be a shared_ptr, since it deletes all the others. | |
shared_ptr < AIDA::IAnalysisFactory > | _theAnalysisFactory |
The AIDA analysis factory. | |
AIDA::ITreeFactory * | _theTreeFactory |
The AIDA tree factory. | |
AIDA::ITree * | _theTree |
The AIDA tree object. | |
AIDA::IHistogramFactory * | _theHistogramFactory |
The AIDA histogram factory. | |
AIDA::IDataPointSetFactory * | _theDataPointSetFactory |
The AIDA data point set factory. |
AnalysisHandler | ( | const string & | runname = "" |
) |
Preferred constructor, with optional run name.
Definition at line 17 of file AnalysisHandler.cc.
References AnalysisHandler::_setupFactories(), AnalysisHandler::_theAnalysisFactory, and Rivet::createAnalysisFactory().
00018 : _runname(runname), _numEvents(0), 00019 _sumOfWeights(0.0), _xs(-1.0), 00020 _initialised(false) 00021 { 00022 _theAnalysisFactory.reset( createAnalysisFactory() ); 00023 _setupFactories(); 00024 }
AnalysisHandler | ( | const string & | basefilename, | |
const string & | runname, | |||
HistoFormat | storetype = AIDAML | |||
) |
Make a Rivet handler with a set base filename and store type.
An AnalysisHandler built with this constructor sets the output histo format and filename when the handler is created rather than when it is written. This is not the preferred behaviour, to allow for more flexible histogramming in future, use the writeData() method to supply the filename and format at the point of file-writing.
basefilename | the name of the file (no extension) where histograms are to be stored. | |
runname | optional name of this run, prepended to AIDA data paths. | |
storetype | a string indicating to the AIDA analysis factory how to store the histograms. Which strings are allowed depends on actual AIDA implementation used. To output in standard AIDA XML the string is typically "xml". | |
afac | an AIDA analysis factory object. The caller must make sure that the lifetime of the factory object exceeds the AnalysisHandler object. |
Note that the run name is now a compulsory argument: this is to avoid conflict with the preferred one-argument constructor.
Definition at line 27 of file AnalysisHandler.cc.
References AnalysisHandler::_setupFactories(), AnalysisHandler::_theAnalysisFactory, and Rivet::createAnalysisFactory().
00029 : _runname(runname), _numEvents(0), 00030 _sumOfWeights(0.0), _xs(-1.0), 00031 _initialised(false) 00032 { 00033 cerr << "AnalysisHandler(basefilename, runname, format) constructor is deprecated: " 00034 << "please migrate your code to use the one-arg constructor" << endl; 00035 _theAnalysisFactory.reset( createAnalysisFactory() ); 00036 _setupFactories(basefilename, storetype); 00037 }
~AnalysisHandler | ( | ) |
Destructor The destructor is not virtual, as this class should not be inherited from.
Definition at line 51 of file AnalysisHandler.cc.
AnalysisHandler | ( | const AnalysisHandler & | ) | [private] |
The copy constructor is private and must never be called. In fact, it should not even be implemented.
void _setupFactories | ( | const string & | basefilename, | |
HistoFormat | storetype | |||
) | [private] |
Do the initialisation of the AIDA analysis factories.
Definition at line 231 of file AnalysisHandler.cc.
References AnalysisHandler::_theAnalysisFactory, AnalysisHandler::_theDataPointSetFactory, AnalysisHandler::_theHistogramFactory, AnalysisHandler::_theTree, AnalysisHandler::_theTreeFactory, Rivet::AIDAML, Rivet::endsWith(), Rivet::FLAT, Rivet::ROOT, and AnalysisHandler::tree().
00231 { 00232 string filename(basefilename), storetypestr(""); 00233 if (storetype == AIDAML) { 00234 if (!endsWith(filename, ".aida")) filename += ".aida"; 00235 storetypestr = "xml"; 00236 } else if (storetype == FLAT) { 00237 if (!endsWith(filename, ".data")) filename += ".data"; 00238 storetypestr = "flat"; 00239 } else if (storetype == ROOT) { 00240 if (!endsWith(filename, ".root")) filename += ".root"; 00241 storetypestr = "root"; 00242 } 00243 _theTreeFactory = _theAnalysisFactory->createTreeFactory(); 00244 _theTree = _theTreeFactory->create(filename, storetypestr, false, true); 00245 _theHistogramFactory = _theAnalysisFactory->createHistogramFactory(tree()); 00246 _theDataPointSetFactory = _theAnalysisFactory->createDataPointSetFactory(tree()); 00247 }
void _setupFactories | ( | ) | [private] |
Do the initialisation of the AIDA analysis factories with no store.
Definition at line 250 of file AnalysisHandler.cc.
References AnalysisHandler::_theAnalysisFactory, AnalysisHandler::_theDataPointSetFactory, AnalysisHandler::_theHistogramFactory, AnalysisHandler::_theTree, AnalysisHandler::_theTreeFactory, and AnalysisHandler::tree().
Referenced by AnalysisHandler::AnalysisHandler().
00250 { 00251 _theTreeFactory = _theAnalysisFactory->createTreeFactory(); 00252 _theTree = _theTreeFactory->create(); 00253 _theHistogramFactory = _theAnalysisFactory->createHistogramFactory(tree()); 00254 _theDataPointSetFactory = _theAnalysisFactory->createDataPointSetFactory(tree()); 00255 }
void _normalizeTree | ( | AIDA::ITree & | tree | ) | [private] |
Convert any IHistogram1D objects in the AIDA tree to IDataPointSet objects.
Referenced by AnalysisHandler::finalize().
Log & getLog | ( | ) | [private] |
Get a logger object.
Definition at line 55 of file AnalysisHandler.cc.
References Log::getLog().
Referenced by AnalysisHandler::analyze(), AnalysisHandler::finalize(), AnalysisHandler::init(), AnalysisHandler::removeIncompatibleAnalyses(), and AnalysisHandler::setRunBeams().
00055 { 00056 return Log::getLog("Rivet.Analysis.Handler"); 00057 }
string runName | ( | ) | const |
Get the name of this run.
Definition at line 321 of file AnalysisHandler.cc.
References AnalysisHandler::_runname.
Referenced by Analysis::histoDir().
00321 { return _runname; }
size_t numEvents | ( | ) | const |
Get the number of events seen. Should only really be used by external steering code or analyses in the finalize phase.
Definition at line 322 of file AnalysisHandler.cc.
References AnalysisHandler::_numEvents.
Referenced by Analysis::numEvents().
00322 { return _numEvents; }
double sumOfWeights | ( | ) | const |
Get the sum of the event weights seen - the weighted equivalent of the number of events. Should only really be used by external steering code or analyses in the finalize phase.
Definition at line 323 of file AnalysisHandler.cc.
References AnalysisHandler::_sumOfWeights.
Referenced by Analysis::sumOfWeights().
00323 { return _sumOfWeights; }
void setSumOfWeights | ( | const double & | sum | ) |
Set sum of weights. This is useful if Rivet is steered externally and the analyses are run for a sub-contribution of the events (but of course have to be normalised to the total sum of weights)
Definition at line 326 of file AnalysisHandler.cc.
References AnalysisHandler::_sumOfWeights.
00326 { 00327 _sumOfWeights=sum; 00328 }
bool needCrossSection | ( | ) | const |
Is cross-section information required by at least one child analysis?
Definition at line 378 of file AnalysisHandler.cc.
References AnalysisHandler::_analyses.
Referenced by Run::processEvent().
00378 { 00379 bool rtn = false; 00380 foreach (const AnaHandle a, _analyses) { 00381 if (!rtn) rtn = a->needsCrossSection(); 00382 if (rtn) break; 00383 } 00384 return rtn; 00385 }
AnalysisHandler & setCrossSection | ( | double | xs | ) |
Set the cross-section for the process being generated.
Definition at line 388 of file AnalysisHandler.cc.
References AnalysisHandler::_analyses, and AnalysisHandler::_xs.
Referenced by AnalysisHandler::analyze(), Run::init(), and Run::processEvent().
00388 { 00389 _xs = xs; 00390 foreach (AnaHandle a, _analyses) { 00391 a->setCrossSection(xs); 00392 } 00393 return *this; 00394 }
double crossSection | ( | ) | const [inline] |
Get the cross-section known to the handler.
Definition at line 136 of file AnalysisHandler.hh.
References AnalysisHandler::_xs.
Referenced by AnalysisHandler::hasCrossSection().
00136 { 00137 return _xs; 00138 }
bool hasCrossSection | ( | ) | const |
Whether the handler knows about a cross-section.
Definition at line 397 of file AnalysisHandler.cc.
References AnalysisHandler::crossSection().
Referenced by Run::processEvent().
00397 { 00398 return (crossSection() >= 0); 00399 }
AnalysisHandler& setRunBeams | ( | const ParticlePair & | beams | ) | [inline] |
Set beams for this run.
Definition at line 145 of file AnalysisHandler.hh.
References AnalysisHandler::_beams, Log::DEBUG, AnalysisHandler::getLog(), Rivet::GeV, and AnalysisHandler::sqrtS().
Referenced by AnalysisHandler::init().
00145 { 00146 _beams = beams; 00147 getLog() << Log::DEBUG << "Setting run beams = " << beams 00148 << " @ " << sqrtS()/GeV << " GeV" << endl; 00149 return *this; 00150 }
const ParticlePair& beams | ( | ) | const [inline] |
Get beam IDs for this run, determined from first event.
Definition at line 153 of file AnalysisHandler.hh.
References AnalysisHandler::_beams.
Referenced by AnalysisHandler::analyze(), AnalysisHandler::beamIds(), Analysis::beams(), and AnalysisHandler::sqrtS().
00153 { 00154 return _beams; 00155 }
PdgIdPair beamIds | ( | ) | const |
Get beam IDs for this run, determined from first event.
Definition at line 409 of file AnalysisHandler.cc.
References Rivet::beamIds(), and AnalysisHandler::beams().
Referenced by Analysis::beamIds(), and AnalysisHandler::init().
00409 { 00410 return Rivet::beamIds(beams()); 00411 }
double sqrtS | ( | ) | const |
Get energy for this run, determined from first event.
Definition at line 414 of file AnalysisHandler.cc.
References AnalysisHandler::beams(), and Rivet::sqrtS().
Referenced by AnalysisHandler::analyze(), AnalysisHandler::setRunBeams(), and Analysis::sqrtS().
00414 { 00415 return Rivet::sqrtS(beams()); 00416 }
std::vector< std::string > analysisNames | ( | ) | const |
Get a list of the currently registered analyses' names.
Definition at line 331 of file AnalysisHandler.cc.
References AnalysisHandler::_analyses.
Referenced by Run::init(), and AnalysisHandler::init().
00331 { 00332 std::vector<std::string> rtn; 00333 foreach (AnaHandle a, _analyses) { 00334 rtn.push_back(a->name()); 00335 } 00336 return rtn; 00337 }
const std::set<AnaHandle, AnaHandleLess>& analyses | ( | ) | const [inline] |
Get the collection of currently registered analyses.
Definition at line 173 of file AnalysisHandler.hh.
References AnalysisHandler::_analyses.
Referenced by AnalysisHandler::init().
00173 { 00174 return _analyses; 00175 }
AnalysisHandler& addAnalysis | ( | const std::string & | analysisname | ) |
Add an analysis to the run list using its name. The actual Analysis to be used will be obtained via AnalysisHandler::getAnalysis(string). If no matching analysis is found, no analysis is added (i.e. the null pointer is checked and discarded.
Referenced by AnalysisHandler::addAnalyses().
AnalysisHandler& removeAnalysis | ( | const std::string & | analysisname | ) |
Remove an analysis from the run list using its name.
Referenced by AnalysisHandler::removeAnalyses(), and AnalysisHandler::removeIncompatibleAnalyses().
AnalysisHandler & addAnalyses | ( | const std::vector< std::string > & | analysisnames | ) |
Add analyses to the run list using their names. The actual Analysis' to be used will be obtained via AnalysisHandler::addAnalysis(string), which in turn uses AnalysisHandler::getAnalysis(string). If no matching analysis is found for a given name, no analysis is added, but also no error is thrown.
Definition at line 340 of file AnalysisHandler.cc.
References AnalysisHandler::addAnalysis().
00340 { 00341 foreach (const string& aname, analysisnames) { 00342 //getLog() << Log::DEBUG << "Adding analysis '" << aname << "'" << endl; 00343 addAnalysis(aname); 00344 } 00345 return *this; 00346 }
AnalysisHandler & removeAnalyses | ( | const std::vector< std::string > & | analysisnames | ) |
Remove analyses from the run list using their names.
Definition at line 349 of file AnalysisHandler.cc.
References AnalysisHandler::removeAnalysis().
00349 { 00350 foreach (const string& aname, analysisnames) { 00351 removeAnalysis(aname); 00352 } 00353 return *this; 00354 }
AnalysisHandler & addAnalysis | ( | Analysis * | analysis | ) |
Add an analysis to the run list by object.
Definition at line 402 of file AnalysisHandler.cc.
References AnalysisHandler::_analyses, and Analysis::_analysishandler.
00402 { 00403 analysis->_analysishandler = this; 00404 _analyses.insert(AnaHandle(analysis)); 00405 return *this; 00406 }
AnalysisHandler & removeIncompatibleAnalyses | ( | const PdgIdPair & | beams | ) |
Remove beam-incompatible analyses from the run list.
Definition at line 215 of file AnalysisHandler.cc.
References AnalysisHandler::_analyses, AnalysisHandler::getLog(), AnalysisHandler::removeAnalysis(), and Log::WARN.
Referenced by AnalysisHandler::init().
00215 { 00216 vector<string> anamestodelete; 00217 foreach (const AnaHandle a, _analyses) { 00218 if (! a->isCompatible(beams)) { 00219 anamestodelete.push_back(a->name()); 00220 } 00221 } 00222 foreach (const string& aname, anamestodelete) { 00223 getLog() << Log::WARN << "Removing incompatible analysis '" 00224 << aname << "'" << endl; 00225 removeAnalysis(aname); 00226 } 00227 return *this; 00228 }
void init | ( | ) | [inline] |
Definition at line 212 of file AnalysisHandler.hh.
Referenced by AnalysisHandler::analyze(), and Run::init().
void init | ( | const GenEvent & | event | ) |
Initialize a run, with the run beams taken from the example event.
Definition at line 60 of file AnalysisHandler.cc.
References AnalysisHandler::_analyses, AnalysisHandler::_initialised, AnalysisHandler::_numEvents, AnalysisHandler::_sumOfWeights, AnalysisHandler::analyses(), AnalysisHandler::analysisNames(), AnalysisHandler::beamIds(), Rivet::beams(), Log::DEBUG, Log::ERROR, AnalysisHandler::getLog(), AnalysisHandler::removeIncompatibleAnalyses(), AnalysisHandler::setRunBeams(), Rivet::toUpper(), and Log::WARN.
00060 { 00061 assert(!_initialised); 00062 setRunBeams(Rivet::beams(ge)); 00063 getLog() << Log::DEBUG << "Initialising the analysis handler" << endl; 00064 _numEvents = 0; 00065 _sumOfWeights = 0.0; 00066 00067 // Check that analyses are beam-compatible 00068 const size_t num_anas_requested = analysisNames().size(); 00069 removeIncompatibleAnalyses(beamIds()); 00070 foreach (const AnaHandle a, analyses()) { 00071 if (toUpper(a->status()) != "VALIDATED") { 00072 getLog() << Log::WARN 00073 << "Analysis '" << a->name() << "' is unvalidated: be careful!" << endl; 00074 } 00075 } 00076 if (num_anas_requested > 0 && analysisNames().size() == 0) { 00077 getLog() << Log::ERROR 00078 << "All analyses were incompatible with the first event's beams\n" 00079 << "Exiting, since this probably isn't intentional!" << endl; 00080 exit(1); 00081 } 00082 00083 foreach (AnaHandle a, _analyses) { 00084 getLog() << Log::DEBUG << "Initialising analysis: " << a->name() << endl; 00085 try { 00086 // Allow projection registration in the init phase onwards 00087 a->_allowProjReg = true; 00088 a->init(); 00089 //getLog() << Log::DEBUG << "Checking consistency of analysis: " << a->name() << endl; 00090 //a->checkConsistency(); 00091 } catch (const Error& err) { 00092 getLog() << Log::ERROR << "Error in " << a->name() << "::init method: " 00093 << err.what() << endl; 00094 exit(1); 00095 } 00096 getLog() << Log::DEBUG << "Done initialising analysis: " << a->name() << endl; 00097 } 00098 _initialised = true; 00099 getLog() << Log::DEBUG << "Analysis handler initialised" << endl; 00100 }
void analyze | ( | const GenEvent & | event | ) |
Analyze the given event. This function will call the AnalysisBase::analyze() function of all included analysis objects.
Definition at line 103 of file AnalysisHandler.cc.
References AnalysisHandler::_analyses, AnalysisHandler::_beams, AnalysisHandler::_initialised, AnalysisHandler::_numEvents, AnalysisHandler::_sumOfWeights, Rivet::beamIds(), AnalysisHandler::beams(), Rivet::compatible(), Log::DEBUG, Log::ERROR, Rivet::fuzzyEquals(), AnalysisHandler::getLog(), Rivet::GeV, AnalysisHandler::init(), AnalysisHandler::setCrossSection(), AnalysisHandler::sqrtS(), Rivet::sqrtS(), and Rivet::toBeamsString().
Referenced by Run::processEvent().
00103 { 00104 // Call init with event as template if not already initialised 00105 if (!_initialised) { 00106 init(ge); 00107 } 00108 // Proceed with event analysis 00109 assert(_initialised); 00110 // Ensure that beam details match those from first event 00111 const PdgIdPair beams = Rivet::beamIds(ge); 00112 const double sqrts = Rivet::sqrtS(ge); 00113 if (!compatible(beams, _beams) || !fuzzyEquals(sqrts, sqrtS())) { 00114 getLog() << Log::ERROR << "Event beams mismatch: " 00115 << toBeamsString(beams) << " @ " << sqrts/GeV << " GeV" << " vs. first beams " 00116 << this->beams() << " @ " << this->sqrtS()/GeV << " GeV" << endl; 00117 exit(1); 00118 } 00119 00120 00121 Event event(ge); 00122 _numEvents++; 00123 // Weights 00124 const double weight = event.weight(); 00125 _sumOfWeights += weight; 00126 getLog() << Log::DEBUG << "Event #" << _numEvents << " weight = " << weight << endl; 00127 #ifdef HEPMC_HAS_CROSS_SECTION 00128 if (ge.cross_section()) { 00129 const double xs = ge.cross_section()->cross_section(); 00130 setCrossSection(xs); 00131 } 00132 #endif 00133 foreach (AnaHandle a, _analyses) { 00134 //getLog() << Log::DEBUG << "About to run analysis " << a->name() << endl; 00135 try { 00136 a->analyze(event); 00137 } catch (const Error& err) { 00138 getLog() << Log::ERROR << "Error in " << a->name() << "::analyze method: " 00139 << err.what() << endl; 00140 exit(1); 00141 } 00142 //getLog() << Log::DEBUG << "Finished running analysis " << a->name() << endl; 00143 } 00144 }
void finalize | ( | ) |
Finalize a run. This function first calls the AnalysisBase::finalize() functions of all included analysis objects and converts all histograms to AIDA DataPointSet objects in the AIDA tree. Using the histogram tree for further analysis or writing to file is left to the API user.
Definition at line 147 of file AnalysisHandler.cc.
References AnalysisHandler::_analyses, AnalysisHandler::_initialised, AnalysisHandler::_normalizeTree(), AnalysisHandler::_numEvents, AnalysisHandler::_theTree, Log::DEBUG, Log::ERROR, AnalysisHandler::getLog(), Log::INFO, and AnalysisHandler::tree().
00147 { 00148 assert(_initialised); 00149 getLog() << Log::INFO << "Finalising analyses" << endl; 00150 foreach (AnaHandle a, _analyses) { 00151 try { 00152 a->finalize(); 00153 } catch (const Error& err) { 00154 getLog() << Log::ERROR << "Error in " << a->name() << "::finalize method: " 00155 << err.what() << endl; 00156 exit(1); 00157 } 00158 } 00159 00160 // Print out number of events processed 00161 getLog() << Log::INFO << "Processed " << _numEvents << " event" << (_numEvents == 1 ? "" : "s") << endl; 00162 00163 // Change AIDA histos into data point sets 00164 getLog() << Log::DEBUG << "Converting histograms to scatter plots" << endl; 00165 assert(_theTree != 0); 00166 _normalizeTree(tree()); 00167 00168 // Delete analyses 00169 getLog() << Log::DEBUG << "Deleting analyses" << endl; 00170 _analyses.clear(); 00171 00172 // Print out MCnet boilerplate 00173 cout << endl; 00174 cout << "The MCnet usage guidelines apply to Rivet: see http://www.montecarlonet.org/GUIDELINES" << endl; 00175 cout << "Please acknowledge plots made with Rivet analyses, and cite arXiv:1003.0694 (http://arxiv.org/abs/1003.0694)" << endl; 00176 }
AIDA::IAnalysisFactory & analysisFactory | ( | ) |
The AIDA analysis factory.
Definition at line 358 of file AnalysisHandler.cc.
References AnalysisHandler::_theAnalysisFactory.
Referenced by Analysis::analysisFactory().
00358 { 00359 return *_theAnalysisFactory; 00360 }
void commitData | ( | ) |
Commit the AIDA tree to file.
Definition at line 258 of file AnalysisHandler.cc.
References AnalysisHandler::tree().
00258 { 00259 tree().commit(); 00260 }
void writeData | ( | const std::string & | filename | ) |
Write the AIDA tree to the named file.
AIDA::ITree & tree | ( | ) |
The AIDA tree object.
Definition at line 363 of file AnalysisHandler.cc.
References AnalysisHandler::_theTree.
Referenced by AnalysisHandler::_setupFactories(), AnalysisHandler::commitData(), AnalysisHandler::finalize(), and Analysis::tree().
00363 { 00364 return *_theTree; 00365 }
AIDA::IHistogramFactory & histogramFactory | ( | ) |
The AIDA histogram factory.
Definition at line 368 of file AnalysisHandler.cc.
References AnalysisHandler::_theHistogramFactory.
Referenced by Analysis::histogramFactory().
00368 { 00369 return *_theHistogramFactory; 00370 }
AIDA::IDataPointSetFactory & datapointsetFactory | ( | ) |
The AIDA histogram factory.
Definition at line 373 of file AnalysisHandler.cc.
References AnalysisHandler::_theDataPointSetFactory.
Referenced by Analysis::datapointsetFactory().
00373 { 00374 return *_theDataPointSetFactory; 00375 }
AnalysisHandler& operator= | ( | const AnalysisHandler & | ) | [private] |
The assignment operator is private and must never be called. In fact, it should not even be implemented.
set<AnaHandle, AnaHandleLess> _analyses [private] |
The collection of Analysis objects to be used.
Definition at line 272 of file AnalysisHandler.hh.
Referenced by AnalysisHandler::addAnalysis(), AnalysisHandler::analyses(), AnalysisHandler::analysisNames(), AnalysisHandler::analyze(), AnalysisHandler::finalize(), AnalysisHandler::init(), AnalysisHandler::needCrossSection(), AnalysisHandler::removeIncompatibleAnalyses(), and AnalysisHandler::setCrossSection().
std::string _runname [private] |
Run name.
Definition at line 279 of file AnalysisHandler.hh.
Referenced by AnalysisHandler::runName().
size_t _numEvents [private] |
Number of events seen.
Definition at line 282 of file AnalysisHandler.hh.
Referenced by AnalysisHandler::analyze(), AnalysisHandler::finalize(), AnalysisHandler::init(), and AnalysisHandler::numEvents().
double _sumOfWeights [private] |
Sum of event weights seen.
Definition at line 285 of file AnalysisHandler.hh.
Referenced by AnalysisHandler::analyze(), AnalysisHandler::init(), AnalysisHandler::setSumOfWeights(), and AnalysisHandler::sumOfWeights().
double _xs [private] |
Cross-section known to AH.
Definition at line 288 of file AnalysisHandler.hh.
Referenced by AnalysisHandler::crossSection(), and AnalysisHandler::setCrossSection().
ParticlePair _beams [private] |
Beams used by this run.
Definition at line 291 of file AnalysisHandler.hh.
Referenced by AnalysisHandler::analyze(), AnalysisHandler::beams(), and AnalysisHandler::setRunBeams().
bool _initialised [private] |
Flag to check if init has been called.
Definition at line 294 of file AnalysisHandler.hh.
Referenced by AnalysisHandler::analyze(), AnalysisHandler::finalize(), and AnalysisHandler::init().
shared_ptr<AIDA::IAnalysisFactory> _theAnalysisFactory [private] |
The AIDA analysis factory.
Definition at line 304 of file AnalysisHandler.hh.
Referenced by AnalysisHandler::_setupFactories(), AnalysisHandler::analysisFactory(), and AnalysisHandler::AnalysisHandler().
AIDA::ITreeFactory* _theTreeFactory [private] |
The AIDA tree factory.
Definition at line 307 of file AnalysisHandler.hh.
Referenced by AnalysisHandler::_setupFactories().
AIDA::ITree* _theTree [private] |
The AIDA tree object.
Definition at line 310 of file AnalysisHandler.hh.
Referenced by AnalysisHandler::_setupFactories(), AnalysisHandler::finalize(), and AnalysisHandler::tree().
AIDA::IHistogramFactory* _theHistogramFactory [private] |
The AIDA histogram factory.
Definition at line 313 of file AnalysisHandler.hh.
Referenced by AnalysisHandler::_setupFactories(), and AnalysisHandler::histogramFactory().
AIDA::IDataPointSetFactory* _theDataPointSetFactory [private] |
The AIDA data point set factory.
Definition at line 316 of file AnalysisHandler.hh.
Referenced by AnalysisHandler::_setupFactories(), and AnalysisHandler::datapointsetFactory().