#include <HistManModule.h>
Inheritance diagram for HistManModule:

Public Member Functions | |
| HistManModule () | |
| ~HistManModule () | |
| virtual void | EndFile () |
| virtual void | EndJob () |
| virtual const Registry & | DefaultConfig () const |
| virtual JobCResult | Put (const MomNavigator *) |
Static Public Member Functions | |
| HistMan | GetHistMan (JobCModule &mod, const char *subdir=0) |
Configuration parameters:
"OutputFilename" sets the name of the end-of-job file to write out. Set to 0 or "" to not write out end-of-job
"FileExtension" sets the end-of-file extension to use when writing out end-of-file histograms. This is mutually exclusive with and if set, supersedes "OutputFilename". This causes one HistMan file to be written out for each input file. The output filename will be formed by using the input filename up to the first "." with the "FileExtension" added (should include an initial "." if one is desired).
There is a static method, HistMan::GetHistMan(), to get a uniquely rooted HistMan based on the UniqueName of the given JobCModule and an optional subdirectory.
One should place "HistMan::Put" in the path to get the histograms written out.
Created on: Fri Apr 15 10:40:34 2005
Definition at line 51 of file HistManModule.h.
|
|
Definition at line 13 of file HistManModule.cxx. 00014 {
00015 }
|
|
|
Definition at line 17 of file HistManModule.cxx. 00018 {
00019 }
|
|
|
Get the default configuration registry. This should normally be overridden. One useful idiom is to implement it like: const Registry& MyModule::DefaultConfig() const { static Registry cfg; // never is destroyed if (cfg.Size()) return cfg; // already filled it // set defaults: cfg.Set("TheAnswer",42); cfg.Set("Units","unknown"); return cfg; } Reimplemented from JobCModule. Definition at line 52 of file HistManModule.cxx. References Registry::Set(), and Registry::Size(). 00053 {
00054 static Registry r;
00055 if (!r.Size()) {
00056 r.Set("OutputFilename","histman.root");
00057 r.Set("FileExtension","");
00058 }
00059 return r;
00060 }
|
|
|
Implement for notification of end of file. See GetLastFile(). Reimplemented from JobCModule. Definition at line 28 of file HistManModule.cxx. References Registry::Get(), JobCModule::GetConfig(), make_name(), and HistMan::WriteOut(). 00029 {
00030 const char* fileext = "";
00031 this->GetConfig().Get("FileExtension",fileext);
00032 if (! (fileext && fileext[0])) return;
00033
00034 string filename = make_name(this->GetLastFile(),fileext);
00035
00036 HistMan hm("");
00037 hm.WriteOut(filename.c_str());
00038 }
|
|
|
Implement for notification of end of job Reimplemented from JobCModule. Definition at line 40 of file HistManModule.cxx. References Registry::Get(), JobCModule::GetConfig(), and HistMan::WriteOut(). 00041 {
00042 const char* fileext = "";
00043 this->GetConfig().Get("FileExtension",fileext);
00044 if (fileext && fileext[0]) return;
00045
00046 const char* filename = "histman.root";
00047 this->GetConfig().Get("OutputFilename",filename);
00048 HistMan hm("");
00049 hm.WriteOut(filename);
00050 }
|
|
||||||||||||
|
Definition at line 69 of file HistManModule.cxx. References Form(), and JobCModule::GetUniqueName(). Referenced by UserAnalysis::BeginJob(). 00070 {
00071 if (subdir)
00072 return HistMan(Form("%s/%s",mod.GetUniqueName(),subdir));
00073 return HistMan(mod.GetUniqueName());
00074 }
|
|
|
Implement if your module needs to write data to some external sink. Reimplemented from JobCModule. Definition at line 62 of file HistManModule.cxx. 00063 {
00064 // dummy so we can get our EndJob done.
00065 return JobCResult::kAOK;
00066 }
|
1.3.9.1