Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 // 25 // 26 /* 26 /* 27 * =========================================== 27 * ============================================================================= 28 * 28 * 29 * Filename: CexmcEventSObject.hh 29 * Filename: CexmcEventSObject.hh 30 * 30 * 31 * Description: event data serialization h 31 * Description: event data serialization helper 32 * 32 * 33 * Version: 1.0 33 * Version: 1.0 34 * Created: 30.12.2009 16:54:30 34 * Created: 30.12.2009 16:54:30 35 * Revision: none 35 * Revision: none 36 * Compiler: gcc 36 * Compiler: gcc 37 * 37 * 38 * Author: Alexey Radkov (), 38 * Author: Alexey Radkov (), 39 * Company: PNPI 39 * Company: PNPI 40 * 40 * 41 * =========================================== 41 * ============================================================================= 42 */ 42 */ 43 43 44 #ifndef CEXMC_EVENT_SOBJECT_HH 44 #ifndef CEXMC_EVENT_SOBJECT_HH 45 #define CEXMC_EVENT_SOBJECT_HH 45 #define CEXMC_EVENT_SOBJECT_HH 46 46 47 #ifdef CEXMC_USE_PERSISTENCY 47 #ifdef CEXMC_USE_PERSISTENCY 48 48 >> 49 #include <boost/serialization/access.hpp> 49 #include <boost/serialization/vector.hpp> 50 #include <boost/serialization/vector.hpp> 50 #include "CexmcSimpleTrackPointInfoStore.hh" 51 #include "CexmcSimpleTrackPointInfoStore.hh" 51 #include "CexmcSimpleProductionModelDataStore. 52 #include "CexmcSimpleProductionModelDataStore.hh" 52 #include "CexmcCommon.hh" 53 #include "CexmcCommon.hh" 53 54 >> 55 class CexmcTrackPointInfo; >> 56 class CexmcProductionModelData; 54 57 55 struct CexmcEventSObject << 58 >> 59 class CexmcEventSObject 56 { 60 { 57 G4int e << 61 friend class boost::serialization::access; >> 62 friend class CexmcRunManager; >> 63 #ifdef CEXMC_USE_CUSTOM_FILTER >> 64 friend class CexmcASTEval; >> 65 #endif >> 66 >> 67 public: >> 68 CexmcEventSObject(); >> 69 >> 70 CexmcEventSObject( G4int eventId, >> 71 G4bool edDigitizerMonitorHasTriggered, G4double monitorED, >> 72 G4double vetoCounterEDLeft, G4double vetoCounterEDRight, >> 73 G4double calorimeterEDLeft, G4double calorimeterEDRight, >> 74 const CexmcEnergyDepositCalorimeterCollection & >> 75 calorimeterEDLeftCollection, >> 76 const CexmcEnergyDepositCalorimeterCollection & >> 77 calorimeterEDRightCollection, >> 78 const CexmcTrackPointInfo & monitorTP, >> 79 const CexmcTrackPointInfo & targetTPBeamParticle, >> 80 const CexmcTrackPointInfo & targetTPOutputParticle, >> 81 const CexmcTrackPointInfo & targetTPNucleusParticle, >> 82 const CexmcTrackPointInfo & >> 83 targetTPOutputParticleDecayProductParticle1, >> 84 const CexmcTrackPointInfo & >> 85 targetTPOutputParticleDecayProductParticle2, >> 86 const CexmcTrackPointInfo & vetoCounterTPLeft, >> 87 const CexmcTrackPointInfo & vetoCounterTPRight, >> 88 const CexmcTrackPointInfo & calorimeterTPLeft, >> 89 const CexmcTrackPointInfo & calorimeterTPRight, >> 90 const CexmcProductionModelData & productionModelData ); >> 91 >> 92 private: >> 93 template < typename Archive > >> 94 void serialize( Archive & archive, const unsigned int version ); 58 95 59 G4bool e << 96 private: >> 97 G4int eventId; 60 98 61 G4double m << 99 G4bool edDigitizerMonitorHasTriggered; 62 100 63 G4double v << 101 G4double monitorED; 64 102 65 G4double v << 103 G4double vetoCounterEDLeft; 66 104 67 G4double c << 105 G4double vetoCounterEDRight; 68 106 69 G4double c << 107 G4double calorimeterEDLeft; 70 108 71 CexmcEnergyDepositCalorimeterCollection c << 109 G4double calorimeterEDRight; 72 110 73 CexmcEnergyDepositCalorimeterCollection c << 111 CexmcEnergyDepositCalorimeterCollection calorimeterEDLeftCollection; 74 112 75 CexmcSimpleTrackPointInfoStore m << 113 CexmcEnergyDepositCalorimeterCollection calorimeterEDRightCollection; 76 114 77 CexmcSimpleTrackPointInfoStore t << 115 CexmcSimpleTrackPointInfoStore monitorTP; 78 116 79 CexmcSimpleTrackPointInfoStore t << 117 CexmcSimpleTrackPointInfoStore targetTPBeamParticle; 80 118 81 CexmcSimpleTrackPointInfoStore t << 119 CexmcSimpleTrackPointInfoStore targetTPOutputParticle; 82 120 83 CexmcSimpleTrackPointInfoStore targetTPOu << 121 CexmcSimpleTrackPointInfoStore targetTPNucleusParticle; 84 122 85 CexmcSimpleTrackPointInfoStore targetTPOu << 123 CexmcSimpleTrackPointInfoStore >> 124 targetTPOutputParticleDecayProductParticle1; 86 125 87 CexmcSimpleTrackPointInfoStore v << 126 CexmcSimpleTrackPointInfoStore >> 127 targetTPOutputParticleDecayProductParticle2; 88 128 89 CexmcSimpleTrackPointInfoStore v << 129 CexmcSimpleTrackPointInfoStore vetoCounterTPLeft; 90 130 91 CexmcSimpleTrackPointInfoStore c << 131 CexmcSimpleTrackPointInfoStore vetoCounterTPRight; 92 132 93 CexmcSimpleTrackPointInfoStore c << 133 CexmcSimpleTrackPointInfoStore calorimeterTPLeft; 94 134 95 CexmcSimpleProductionModelDataStore p << 135 CexmcSimpleTrackPointInfoStore calorimeterTPRight; 96 136 97 template < typename Archive > << 137 CexmcSimpleProductionModelDataStore productionModelData; 98 void serialize( Archive & archive, const << 99 }; 138 }; 100 139 101 140 102 template < typename Archive > 141 template < typename Archive > 103 void CexmcEventSObject::serialize( Archive & 142 void CexmcEventSObject::serialize( Archive & archive, const unsigned int ) 104 { 143 { 105 archive & eventId; 144 archive & eventId; 106 archive & edDigitizerMonitorHasTriggered; 145 archive & edDigitizerMonitorHasTriggered; 107 archive & monitorED; 146 archive & monitorED; 108 archive & vetoCounterEDLeft; 147 archive & vetoCounterEDLeft; 109 archive & vetoCounterEDRight; 148 archive & vetoCounterEDRight; 110 archive & calorimeterEDLeft; 149 archive & calorimeterEDLeft; 111 archive & calorimeterEDRight; 150 archive & calorimeterEDRight; 112 archive & calorimeterEDLeftCollection; 151 archive & calorimeterEDLeftCollection; 113 archive & calorimeterEDRightCollection; 152 archive & calorimeterEDRightCollection; 114 archive & monitorTP; 153 archive & monitorTP; 115 archive & targetTPBeamParticle; 154 archive & targetTPBeamParticle; 116 archive & targetTPOutputParticle; 155 archive & targetTPOutputParticle; 117 archive & targetTPNucleusParticle; 156 archive & targetTPNucleusParticle; 118 archive & targetTPOutputParticleDecayProdu 157 archive & targetTPOutputParticleDecayProductParticle1; 119 archive & targetTPOutputParticleDecayProdu 158 archive & targetTPOutputParticleDecayProductParticle2; 120 archive & vetoCounterTPLeft; 159 archive & vetoCounterTPLeft; 121 archive & vetoCounterTPRight; 160 archive & vetoCounterTPRight; 122 archive & calorimeterTPLeft; 161 archive & calorimeterTPLeft; 123 archive & calorimeterTPRight; 162 archive & calorimeterTPRight; 124 archive & productionModelData; 163 archive & productionModelData; 125 } 164 } 126 165 127 #endif 166 #endif 128 167 129 #endif 168 #endif 130 169 131 170