#include <McNormalizationFinder.h>
Public Member Functions | |
| virtual | ~McNormalizationFinder () |
| Float_t | GetNearDetEvPerPOT (string &beam_config, string &mc_version, string &modifier) const |
| Return the events per POT in the near detector for a given beam and MC. | |
| Float_t | GetRockEvPerPOT (string &beam_config, string &mc_version, string &modifier) const |
| Return the events per POT in the rock for a given beam and MC. | |
| const MC_Normalization * | GetEntry (string &beam_config, string &mc_version, string &modifier) const |
| Return MC_Normalization row for a given beam and MC (useful to check that such a row exists). | |
| void | Print (std::string option="") const |
| Print the entire MC_NORMALIZATION table. | |
Static Public Member Functions | |
| McNormalizationFinder & | Instance () |
| Singleton access. | |
Private Member Functions | |
| McNormalizationFinder () | |
Private Attributes | |
| DbiResultPtr< MC_Normalization > | fMcNormalizationTable |
| Access to entire MC_NORMALIZATION table. | |
Static Private Attributes | |
| McNormalizationFinder * | fgInstance = 0 |
|
|
Definition at line 31 of file McNormalizationFinder.h. 00031 {}
|
|
|
Definition at line 14 of file McNormalizationFinder.cxx. References fMcNormalizationTable, and DbiResultPtr< T >::NewQuery(). 00015 {
00016 // ctor
00017
00018 // Use an arbitrary context (any should do) to query MC_NORMALIZATION table.
00019 VldTimeStamp ts(2009,1,1,1,0,0);
00020 VldContext context(Detector::kNear,SimFlag::kData,ts);
00021 fMcNormalizationTable.NewQuery(context);
00022
00023 }
|
|
||||||||||||||||
|
Return MC_Normalization row for a given beam and MC (useful to check that such a row exists).
Definition at line 53 of file McNormalizationFinder.cxx. References fMcNormalizationTable, DbiResultPtr< T >::GetNumRows(), and DbiResultPtr< T >::GetRow(). 00053 {
00054 for ( unsigned int i_row = 0; i_row < fMcNormalizationTable.GetNumRows(); ++i_row ) {
00055 const MC_Normalization* row(fMcNormalizationTable.GetRow(i_row));
00056 if ( beam_config == row->GetBeamConfig()
00057 && mc_version == row->GetMCVersion()
00058 && modifier == row->GetModifier() ) return row;
00059 }
00060 return NULL;
00061 }
|
|
||||||||||||||||
|
Return the events per POT in the near detector for a given beam and MC.
Definition at line 39 of file McNormalizationFinder.cxx. 00039 {
00040 const MC_Normalization* row(this->GetEntry(beam_config,mc_version,modifier));
00041 return row ? row->GetNearDetEvPerPot() : -999.;
00042 }
|
|
||||||||||||||||
|
Return the events per POT in the rock for a given beam and MC.
Definition at line 46 of file McNormalizationFinder.cxx. 00046 {
00047 const MC_Normalization* row(this->GetEntry(beam_config,mc_version,modifier));
00048 return row ? row->GetRockEvPerPot() : -999.;
00049 }
|
|
|
Singleton access.
Definition at line 27 of file McNormalizationFinder.cxx. References fgInstance, and McNormalizationFinder::Cleaner::UseMe(). 00028 {
00029 static Cleaner cleaner; // cleaner dtor calls McNormalizationFinder dtor
00030 if ( ! fgInstance ) {
00031 fgInstance = new McNormalizationFinder;
00032 cleaner.UseMe();
00033 }
00034 return *fgInstance;
00035 }
|
|
|
Print the entire MC_NORMALIZATION table.
|
|
|
Definition at line 10 of file McNormalizationFinder.cxx. Referenced by Instance(), and McNormalizationFinder::Cleaner::~Cleaner(). |
|
|
Access to entire MC_NORMALIZATION table.
Definition at line 49 of file McNormalizationFinder.h. Referenced by GetEntry(), and McNormalizationFinder(). |
1.3.9.1