14 |
|
|
15 |
/*! @brief An action that saves the selected events |
/*! @brief An action that saves the selected events |
16 |
* |
* |
17 |
* This action saves the selected events into a ROOT file. |
* This action saves the selected events into a ROOT file. WARNING: since this class uses the PamLevel2 clone trees, you can |
18 |
|
* have NO MORE THAN 1 SaveEventsAction objects in your code (otherwise they will share the same PamLevel2 clone trees, resulting |
19 |
|
* in an undefined behavior). |
20 |
*/ |
*/ |
21 |
class SaveEventsAction: public CollectionAction { |
class SaveEventsAction: public CollectionAction { |
22 |
|
|
29 |
* @param actionName The action's name. |
* @param actionName The action's name. |
30 |
* @param outFileName The output file name, with path (absolute or relative). |
* @param outFileName The output file name, with path (absolute or relative). |
31 |
* @param outOptions The output options. |
* @param outOptions The output options. |
32 |
|
* @param maxFileSize The maximum output file size in bytes; default is 4 GB. If the maximum size will exceed this value |
33 |
|
* an error will be generated, since the first clone tree in PamLevel2 which during its Fill will exceed |
34 |
|
* this value will try to close the current file and open another one (this is the predefined TTree behavior) |
35 |
|
* leaving the other clone trees with no file to write on. |
36 |
|
* Note: if specifying the size you get a compiler warning like "warning: this decimal constant is unsigned |
37 |
|
* only in ISO C90" then append LL to the numerical constant, to tell the compiler that it has to be interpreted |
38 |
|
* as a long long int. |
39 |
*/ |
*/ |
40 |
SaveEventsAction(const char *actionName, TString outFileName, TString outOptions = TString("")); |
SaveEventsAction(const char *actionName, TString outFileName, TString outOptions = TString(""), Long64_t maxFileSize = |
41 |
|
4000000000LL); |
42 |
|
|
43 |
/*! @brief Destructor */ |
/*! @brief Destructor */ |
44 |
~SaveEventsAction() { |
~SaveEventsAction() { |
67 |
PamLevel2 *_events; |
PamLevel2 *_events; |
68 |
TString _outOptions; |
TString _outOptions; |
69 |
TString _outFileName; |
TString _outFileName; |
70 |
|
Long64_t _maxFileSize; |
71 |
}; |
}; |
72 |
|
|
73 |
#endif /* SAVEEVENTSACTION_H_ */ |
#endif /* SAVEEVENTSACTION_H_ */ |