10 #ifndef DQM_ALGORITHMS_PASSINPUT_CXX
11 #define DQM_ALGORITHMS_PASSINPUT_CXX
13 #include <dqm_core/AlgorithmConfig.h>
19 #include <dqm_core/AlgorithmManager.h>
21 #ifndef DQM_ALGORITHMS_MULTIALGORITHMTEST
44 const TObject&
object,
45 const dqm_core::AlgorithmConfig&
config )
50 if( (!
object.
IsA()->InheritsFrom(
"TH1" )) && (!
object.
IsA()->InheritsFrom(
"TObjArray" )) ) {
51 throw dqm_core::BadConfig( ERS_HERE,
name,
"input object does not inherit from either TH1 or TObjArray");
55 TObject* resultObject =
object.Clone();
56 result->object_ = (boost::shared_ptr<TObject>)resultObject;
60 std::map<std::string,double> configParametersMap =
config.getParameters();
61 if (!configParametersMap.empty()){
62 for ( std::map<std::string,double>::const_iterator paramIter = configParametersMap.begin();
63 paramIter != configParametersMap.end(); ++paramIter ) {
71 tagName=
"ConfParameter--" + paramIter->first;
72 result->tags_[tagName] = paramIter->second;
87 std::map<std::string,double> greenThreshMap =
config.getGreenThresholds();
88 if (!greenThreshMap.empty()) {
89 for ( std::map<std::string,double>::const_iterator itr = greenThreshMap.begin();
90 itr != greenThreshMap.end(); ++itr ){
91 tagName =
"GThreshold--"+itr->first;
92 result->tags_[tagName] = itr->second;
96 std::map<std::string,double> redThreshMap =
config.getRedThresholds();
97 if (!redThreshMap.empty()) {
98 for ( std::map<std::string,double>::const_iterator itr = redThreshMap.begin();
99 itr != redThreshMap.end(); ++itr ){
100 tagName =
"RThreshold--"+itr->first;
101 result->tags_[tagName] = itr->second;
114 out<<
"PassInput: Minimal algorithm to pass its input histogram through to its result." << std::endl;
118 #endif // #ifndef DQM_ALGORITHMS_PASSINPUT_CXX