#include "IFieldDescription.hxx" #include #include #include "ICOMETLog.hxx" using std::cout; using std::endl; COMET::IElementFieldDescription::IElementFieldDescription(const IElementFieldDescription& rhs): fTranslation(NULL), fRotation(NULL) { SetTranslation(rhs.Translation()); SetRotation(rhs.Rotation()); } COMET::IElementFieldDescription::~IElementFieldDescription(){ if (fRotation) delete fRotation; if (fTranslation) delete fTranslation; } void COMET::IFieldDescription::AddElement(const COMET::IElementFieldDescription* element){ if(!element){ COMETError("NULL field description!!!"); return; } const_cast(element)->SetName(Form("field_element_%03u",(unsigned int)fDescriptionList.size())); fDescriptionList.push_back(element); } void COMET::IFieldDescription::ls(Option_t* opt ) const{ TROOT::IncreaseDirLevel(); cout<<"Field description: "<ls(opt); } TROOT::DecreaseDirLevel(); } //bool COMET::IFieldDescription::Recreate()const{ // bool success=true; // for(DescriptionList::const_iterator i_element=fDescriptionList.begin(); // i_element!=fDescriptionList.end();++i_element){ // if(*i_element) { // if( !(*i_element)->Recreate() ) success=false; // } // } // return success; //}