00001 #ifndef CALORIMETRY_CC 00002 #define CALORIMETRY_CC 00003 00004 #include "calorimetry.hh" 00005 00006 namespace larlight { 00007 00008 //************************************************************** 00009 calorimetry::calorimetry(DATA::DATA_TYPE type) : data_base(type) 00010 //************************************************************** 00011 { 00012 if(_type!=DATA::Calorimetry) { 00013 00014 Message::send(MSG::ERROR,__FUNCTION__, 00015 Form("Provided data type (%s) not supported! Reset to default.",DATA::DATA_TREE_NAME[_type].c_str())); 00016 00017 _type=DATA::Calorimetry; 00018 } 00019 00020 clear_data(); 00021 } 00022 00023 //************************************* 00024 void calorimetry::clear_data() 00025 //************************************* 00026 { 00027 data_base::clear_data(); 00028 fdEdx.clear(); 00029 fdQdx.clear(); 00030 fResidualRange.clear(); 00031 fDeadWireResR.clear(); 00032 fTrkPitch.clear(); 00033 fRange = -1; 00034 } 00035 00036 //************************************************************************************************ 00037 event_calorimetry::event_calorimetry(DATA::DATA_TYPE type) : std::vector<larlight::calorimetry>(), 00038 event_base(type) 00039 //************************************************************************************************ 00040 { 00041 if(_type!=DATA::Calorimetry) { 00042 00043 Message::send(MSG::ERROR,__FUNCTION__, 00044 Form("Provided data type (%s) not supported! Reset to default.",DATA::DATA_TREE_NAME[_type].c_str())); 00045 00046 _type=DATA::Calorimetry; 00047 } 00048 00049 clear_data(); 00050 } 00051 00052 } 00053 00054 #endif