The Gaudi Framework  master (37c0b60a)
Collision.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #ifndef GAUDIEXAMPLES_COLLISION_H
12 #define GAUDIEXAMPLES_COLLISION_H 1
13 
14 // Include files
15 #include <GaudiKernel/DataObject.h>
16 #include <GaudiKernel/Kernel.h>
18 
19 namespace Gaudi {
20  namespace Examples {
21 
22  // CLID definition
23  static const CLID& CLID_Collision = 111;
24 
28  class GAUDI_API Collision : public DataObject {
29  public:
31  Collision() = default;
32  Collision( int num ) : DataObject(), m_collision( num ) {}
33 
35  const CLID& clID() const override { return classID(); }
36  static const CLID& classID() { return CLID_Collision; }
37 
38  void setCollision( int num ) { m_collision = num; }
39  int collision() const { return m_collision; }
40  // std::vector<double, CLHEP::HepGenMatrix::Alloc<double,25> >& matrix() {
41  // return m_matrix;
42  // }
44  StreamBuffer& serialize( StreamBuffer& s ) const;
46  StreamBuffer& serialize( StreamBuffer& s );
47 
48  private:
50  int m_collision{ 0 };
51  // std::vector<double, CLHEP::HepGenMatrix::Alloc<double,25> > m_matrix;
52  };
53 
55  inline StreamBuffer& Collision::serialize( StreamBuffer& s ) const { return s << m_collision; }
56 
59  } // namespace Examples
60 } // namespace Gaudi
61 
62 #endif // GAUDIEXAMPLES_COLLISION_H
Gaudi::Examples::Collision::Collision
Collision(int num)
Definition: Collision.h:32
gaudirun.s
string s
Definition: gaudirun.py:346
StreamBuffer.h
StreamBuffer
Definition: StreamBuffer.h:52
Gaudi::Examples::Collision::Collision
Collision()=default
Constructors.
Gaudi::Examples::Collision
Definition: Collision.h:28
Gaudi::Examples::Collision::collision
int collision() const
Definition: Collision.h:39
Gaudi::Examples::Collision::classID
static const CLID & classID()
Definition: Collision.h:36
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:18
Gaudi
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition: __init__.py:1
Gaudi::Examples::Collision::m_collision
int m_collision
Collision number.
Definition: Collision.h:50
Gaudi::Examples::Collision::setCollision
void setCollision(int num)
Definition: Collision.h:38
DataObject.h
Kernel.h
Gaudi::Examples::Collision::serialize
StreamBuffer & serialize(StreamBuffer &s) const
Serialize the object for writing.
Definition: Collision.h:55
DataObject
Definition: DataObject.h:36
Gaudi::Examples::Collision::clID
const CLID & clID() const override
Retrieve reference to class definition structure.
Definition: Collision.h:35
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:81