1 |
pam-fi |
1.1 |
/* |
2 |
|
|
* VerboseCollection.h |
3 |
|
|
* |
4 |
|
|
* Created on: 16-mag-2009 |
5 |
|
|
* Author: Nicola Mori |
6 |
|
|
*/ |
7 |
|
|
|
8 |
|
|
/*! @file VerboseCollection.h The VerboseCollection class definition file */ |
9 |
|
|
|
10 |
|
|
#ifndef VERBOSECOLLECTION_H_ |
11 |
|
|
#define VERBOSECOLLECTION_H_ |
12 |
|
|
|
13 |
|
|
#include "../SmartCollection/SmartCollection.h" |
14 |
|
|
/*! @brief A smart collection which prints selection reports. |
15 |
|
|
* |
16 |
|
|
* This class inherits from SmartCollection, so it can handle actions. It is designed to |
17 |
|
|
* automate a very common task: printing the selection results at the end of the analysis. |
18 |
|
|
* Other desired tasks can be accomplished by means of actions. |
19 |
|
|
*/ |
20 |
|
|
class VerboseCollection: public SmartCollection { |
21 |
|
|
|
22 |
|
|
public: |
23 |
|
|
|
24 |
|
|
/*! @brief Constructor. |
25 |
|
|
* |
26 |
|
|
* @param collectionName The collection's name. |
27 |
pam-fi |
1.2 |
* @param owns If true, the collection will own the cuts and the actions, ie., it will |
28 |
|
|
* destroy them in its destructor. |
29 |
pam-fi |
1.1 |
*/ |
30 |
pam-fi |
1.2 |
VerboseCollection(const char *collectionName, bool owns = true) : |
31 |
|
|
SmartCollection(collectionName, owns) { |
32 |
pam-fi |
1.1 |
} |
33 |
|
|
|
34 |
|
|
/*! @brief Destructor. */ |
35 |
|
|
~VerboseCollection() { |
36 |
|
|
} |
37 |
|
|
|
38 |
|
|
/*! @brief The post analysis task. |
39 |
|
|
* |
40 |
|
|
* This implementation simply prints the selection report, and then calls |
41 |
|
|
* SmartColletion::Finalize(). |
42 |
|
|
*/ |
43 |
|
|
void Finalize(); |
44 |
|
|
|
45 |
|
|
}; |
46 |
|
|
|
47 |
|
|
#endif /* VERBOSECOLLECTION_H_ */ |