Commit in projects/lcdd/branches/v04-01-00-pre on MAIN | |||
include/lcdd/detectors/CalorimeterHitProcessor.hh | -2 | 3232 -> 3233 | |
include/lcdd/processes/calorimeterProcess.hh | -62 | 3232 removed | |
/hit_processorProcess.hh | -43 | 3232 removed | |
/hits_collectionProcess.hh | -43 | 3232 removed | |
src/lcdd/processes/calorimeterProcess.cc | +43 | -25 | 3232 -> 3233 |
/hit_processorProcess.cc | +38 | -31 | 3232 -> 3233 |
+81 | -206 |
More cleanup on dev branch.
--- projects/lcdd/branches/v04-01-00-pre/include/lcdd/detectors/CalorimeterHitProcessor.hh 2014-08-05 23:33:23 UTC (rev 3232) +++ projects/lcdd/branches/v04-01-00-pre/include/lcdd/detectors/CalorimeterHitProcessor.hh 2014-08-05 23:40:31 UTC (rev 3233) @@ -52,10 +52,8 @@
* @param[in] detector The SensitiveDetector associated to this HitProcessor. */ void setSensitiveDetector(SensitiveDetector* detector) {
- G4cout << "CalorimeterHitProcessor::setSensitiveDetector" << G4endl;
HitProcessor::setSensitiveDetector(detector); _calorimeter = dynamic_cast<CalorimeterSD*>(getSensitiveDetector());
- G4cout << "collectionIndex: " << _collectionIndex << G4endl;
} protected:
--- projects/lcdd/branches/v04-01-00-pre/include/lcdd/processes/calorimeterProcess.hh 2014-08-05 23:33:23 UTC (rev 3232) +++ projects/lcdd/branches/v04-01-00-pre/include/lcdd/processes/calorimeterProcess.hh 2014-08-05 23:40:31 UTC (rev 3233) @@ -1,62 +0,0 @@
-#ifndef LCDD_PROCESSES_CALORIMETERPROCESS_HH_ -#define LCDD_PROCESSES_CALORIMETERPROCESS_HH_ 1 - -// GDML -#include "Saxana/ProcessingConfigurator.h" -#include "Saxana/ProcessingContext.h" -#include "Saxana/SAXProcessor.h" -#include "Saxana/StateStack.h" -#include "Saxana/SAXProcessingState.h" -#include "Saxana/SAXStateProcess.h" -#include "Saxana/SAXComponentFactory.h" - -// LCDD -#include "lcdd/schema/calorimeter.hh" -#include "lcdd/processes/SensitiveDetectorTypeProcess.hh" - -// STL -#include <iostream> - -/** - * @brief The SAX process for calorimeter elements. - * @note Calls SAX processor for SensitiveDetectorTypeProcess parent class. - */ -class calorimeterProcess: public SensitiveDetectorTypeProcess { -public: - - /** - * Class constructor. - */ - calorimeterProcess(const ProcessingContext* context = 0); - - /** - * Class destructor. - */ - virtual ~calorimeterProcess(); - - /** - * Start element processing. - */ - virtual void StartElement(const std::string& name, const ASCIIAttributeList& attrs); - - /** - * End element processing. - */ - virtual void EndElement(const std::string&); - - /** - * - */ - virtual void Characters(const std::string&); - - /** - * - */ - virtual void StackPopNotify(const std::string& name); - - /** - */ - virtual const std::string& State() const; -}; - -#endif
--- projects/lcdd/branches/v04-01-00-pre/include/lcdd/processes/hit_processorProcess.hh 2014-08-05 23:33:23 UTC (rev 3232) +++ projects/lcdd/branches/v04-01-00-pre/include/lcdd/processes/hit_processorProcess.hh 2014-08-05 23:40:31 UTC (rev 3233) @@ -1,43 +0,0 @@
-#ifndef LCDD_PROCESSES_HIT_PROCESSORPROCESS_HH_ -#define LCDD_PROCESSES_HIT_PROCESSORPROCESS_HH_ 1 - -// GDML -#include "Saxana/SAXStateProcess.h" -#include "Saxana/SAXObject.h" - -class hit_processorProcess: public SAXStateProcess { - -public: - - hit_processorProcess(); - - hit_processorProcess(ProcessingContext* context); - - virtual ~hit_processorProcess(); - - /** - * Start element processing. - */ - virtual void StartElement(const std::string& name, const ASCIIAttributeList& attrs); - - /** - * End element processing. - */ - virtual void EndElement(const std::string&); - - /** - * Process element character content. - */ - virtual void Characters(const std::string&); - - virtual void StackPopNotify(const std::string& name); - - virtual const std::string& State() const; - -private: - - SAXObject* _obj; - -}; - -#endif
--- projects/lcdd/branches/v04-01-00-pre/include/lcdd/processes/hits_collectionProcess.hh 2014-08-05 23:33:23 UTC (rev 3232) +++ projects/lcdd/branches/v04-01-00-pre/include/lcdd/processes/hits_collectionProcess.hh 2014-08-05 23:40:31 UTC (rev 3233) @@ -1,43 +0,0 @@
-#ifndef LCDD_PROCESSES_HITS_COLLECTIONPROCESS_HH_ -#define LCDD_PROCESSES_HITS_COLLECTIONPROCESS_HH_ 1 - -// GDML -#include "Saxana/SAXStateProcess.h" -#include "Saxana/SAXObject.h" - -class hits_collectionProcess: public SAXStateProcess { - -public: - - hits_collectionProcess(); - - hits_collectionProcess(ProcessingContext* context); - - virtual ~hits_collectionProcess(); - - /** - * Start element processing. - */ - virtual void StartElement(const std::string& name, const ASCIIAttributeList& attrs); - - /** - * End element processing. - */ - virtual void EndElement(const std::string&); - - /** - * Process element character content. - */ - virtual void Characters(const std::string&); - - virtual void StackPopNotify(const std::string& name); - - virtual const std::string& State() const; - -private: - - SAXObject* _obj; - -}; - -#endif
--- projects/lcdd/branches/v04-01-00-pre/src/lcdd/processes/calorimeterProcess.cc 2014-08-05 23:33:23 UTC (rev 3232) +++ projects/lcdd/branches/v04-01-00-pre/src/lcdd/processes/calorimeterProcess.cc 2014-08-05 23:40:31 UTC (rev 3233) @@ -1,39 +1,57 @@
+// GDML +#include "Saxana/ProcessingConfigurator.h" +#include "Saxana/ProcessingContext.h" +#include "Saxana/SAXProcessor.h" +#include "Saxana/StateStack.h" +#include "Saxana/SAXProcessingState.h" +#include "Saxana/SAXStateProcess.h" +#include "Saxana/SAXComponentFactory.h" +
// LCDD
-#include "lcdd/processes/calorimeterProcess.hh"
+#include "lcdd/schema/calorimeter.hh" +#include "lcdd/processes/SensitiveDetectorTypeProcess.hh"
-calorimeterProcess::calorimeterProcess(const ProcessingContext* context) :
+// STL +#include <iostream> + +class calorimeterProcess: public SensitiveDetectorTypeProcess { + +public: + + calorimeterProcess(const ProcessingContext* context = 0) :
SensitiveDetectorTypeProcess(context) {
-}
+ }
-calorimeterProcess::~calorimeterProcess() { -}
+ virtual ~calorimeterProcess() { + }
-void calorimeterProcess::StartElement(const std::string& name, const ASCIIAttributeList& attrs) { - SAXObject** obj = Context()->GetTopObject(); - calorimeter* cal = new calorimeter;
+ void StartElement(const std::string& name, const ASCIIAttributeList& attrs) { + SAXObject** obj = Context()->GetTopObject(); + calorimeter* cal = new calorimeter;
- cal->set_compare(attrs.getValue("hit_aggregation"));
+ cal->set_compare(attrs.getValue("hit_aggregation"));
- _obj = cal; - *obj = cal;
+ _obj = cal; + *obj = cal;
- // parent type to set name and hitsCollectionName - SensitiveDetectorTypeProcess::StartElement(name, attrs); -}
+ // parent type to set name and hitsCollectionName + SensitiveDetectorTypeProcess::StartElement(name, attrs); + }
-void calorimeterProcess::EndElement(const std::string&) { -}
+ void EndElement(const std::string&) { + }
-void calorimeterProcess::Characters(const std::string&) { -}
+ void Characters(const std::string&) { + }
-void calorimeterProcess::StackPopNotify(const std::string& name) { - SensitiveDetectorTypeProcess::StackPopNotify(name); -}
+ void StackPopNotify(const std::string& name) { + SensitiveDetectorTypeProcess::StackPopNotify(name); + }
-const std::string& calorimeterProcess::State() const { - static std::string tag = "calorimeter"; - return tag; -}
+ const std::string& State() const { + static std::string tag = "calorimeter"; + return tag; + } +};
DECLARE_PROCESS_FACTORY(calorimeterProcess)
--- projects/lcdd/branches/v04-01-00-pre/src/lcdd/processes/hit_processorProcess.cc 2014-08-05 23:33:23 UTC (rev 3232) +++ projects/lcdd/branches/v04-01-00-pre/src/lcdd/processes/hit_processorProcess.cc 2014-08-05 23:40:31 UTC (rev 3233) @@ -1,52 +1,59 @@
// LCDD
-#include "lcdd/processes/hit_processorProcess.hh"
#include "lcdd/schema/hit_processor.hh" // GDML #include "Saxana/ProcessingContext.h" #include "Saxana/SAXComponentFactory.h"
+#include "Saxana/SAXStateProcess.h" +#include "Saxana/SAXObject.h"
-hit_processorProcess::hit_processorProcess() :
+class hit_processorProcess: public SAXStateProcess { + + public: + + hit_processorProcess() :
SAXStateProcess(0), _obj(0) {
-}
+ }
-hit_processorProcess::hit_processorProcess(ProcessingContext* context) :
+ hit_processorProcess(ProcessingContext* context) :
SAXStateProcess(context), _obj(0) {
+ }
-}
+ virtual ~hit_processorProcess() { + }
-hit_processorProcess::~hit_processorProcess() {
+ void StartElement(const std::string& name, const ASCIIAttributeList& attrs) { + SAXObject** obj = Context()->GetTopObject(); + hit_processor* hitProcessor = new hit_processor;
-}
+ hitProcessor->set_type(attrs.getValue("type")); + hitProcessor->set_collection_name(attrs.getValue("collection_name"));
-void hit_processorProcess::StartElement(const std::string& name, const ASCIIAttributeList& attrs) { - SAXObject** obj = Context()->GetTopObject(); - hit_processor* hitProcessor = new hit_processor;
+ _obj = hitProcessor; + *obj = hitProcessor; + }
- hitProcessor->set_type(attrs.getValue("type")); - hitProcessor->set_collection_name(attrs.getValue("collection_name"));
+ void EndElement(const std::string&) { + }
- _obj = hitProcessor; - *obj = hitProcessor; -}
+ void Characters(const std::string&) { + }
-void hit_processorProcess::EndElement(const std::string&) { -}
+ // TODO: Add this back if there are child elements added to HitsProcessor XML type. + void StackPopNotify(const std::string& name) { + // SAXObject** so = Context()->GetTopObject(); + // HitProcessorType* hitProcessorType = dynamic_cast<HitProcessorType*>(_obj); + // Push child elements into type object. + // hitProcessorType->add_content(name, *so); + }
-void hit_processorProcess::Characters(const std::string&) { -}
+ const std::string& State() const { + static std::string tag = "hit_processor"; + return tag; + }
-void hit_processorProcess::StackPopNotify(const std::string& name) { - SAXObject** so = Context()->GetTopObject(); - HitProcessorType* hitProcessorType = dynamic_cast<HitProcessorType*>(_obj);
+ private: + SAXObject* _obj; +};
- // Push child elements into type object. - hitProcessorType->add_content(name, *so); -} - -const std::string& hit_processorProcess::State() const { - static std::string tag = "hit_processor"; - return tag; -} -
DECLARE_PROCESS_FACTORY(hit_processorProcess)
Use REPLY-ALL to reply to list
To unsubscribe from the LCDET-SVN list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCDET-SVN&A=1