/data3/calcul/jacquem/working_dir/Micromegas/micromegasFrameWork/lcio/src/cpp/src/CPPFORT/lcrhd.cc

Go to the documentation of this file.
00001 #include "CPPFORT/lcrhd.h"
00002 
00003 #include "lcio.h" 
00004 #include "Exceptions.h"
00005 #include "IOIMPL/LCFactory.h"
00006 #include "IMPL/LCRunHeaderImpl.h"
00007 #include "IMPL/LCEventImpl.h"
00008 #include "IMPL/LCTOOLS.h"
00009 #include <iostream>
00010 
00011 using namespace lcio ;
00012 
00013 
00014 PTRTYPE lcrhdcreate(){
00015   LCRunHeaderImpl* rhd = new LCRunHeaderImpl ;
00016   return reinterpret_cast<PTRTYPE>(rhd) ;
00017 }
00018 
00019 int lcrhddelete( PTRTYPE runHeader ){
00020   LCRunHeaderImpl* rhd =  reinterpret_cast<LCRunHeaderImpl*>(runHeader) ;
00021   delete rhd ;
00022   return LCIO::SUCCESS ;
00023 }
00024 int lcrhdgetrunnumber( PTRTYPE runHeader ){
00025   LCRunHeaderImpl* rhd =  reinterpret_cast<LCRunHeaderImpl*>(runHeader) ;
00026   return rhd->getRunNumber() ;
00027 }
00028 char* lcrhdgetdetectorname( PTRTYPE runHeader  ){
00029   LCRunHeaderImpl* rhd =  reinterpret_cast<LCRunHeaderImpl*>(runHeader) ;
00030   return const_cast<char*>( rhd->getDetectorName().c_str() );
00031 }
00032 char* lcrhdgetdescription( PTRTYPE runHeader ){
00033   LCRunHeaderImpl* rhd =  reinterpret_cast<LCRunHeaderImpl*>(runHeader) ;
00034   return  const_cast<char*>( rhd->getDescription().c_str() );
00035 }
00036 
00037 
00038 PTRTYPE lcrhdgetactivesubdetectors(PTRTYPE runHeader){
00039   LCRunHeaderImpl* rhd =  reinterpret_cast<LCRunHeaderImpl*>(runHeader) ;
00040   return reinterpret_cast<PTRTYPE>( rhd->getActiveSubdetectors()  ) ;
00041 }
00042 
00043 int lcrhdsetrunnumber( PTRTYPE runHeader, int rn){
00044   LCRunHeaderImpl* rhd =  reinterpret_cast<LCRunHeaderImpl*>(runHeader) ;
00045   rhd->setRunNumber( rn ) ;
00046   return LCIO::SUCCESS ;
00047 }
00048 int lcrhdsetdetectorname( PTRTYPE runHeader, const char* dn){
00049   LCRunHeaderImpl* rhd =  reinterpret_cast<LCRunHeaderImpl*>(runHeader) ;
00050   rhd->setDetectorName( dn ) ;
00051   return LCIO::SUCCESS ;
00052 }
00053 int lcrhdsetdescription( PTRTYPE runHeader, const char* dsc){
00054   LCRunHeaderImpl* rhd =  reinterpret_cast<LCRunHeaderImpl*>(runHeader) ;
00055   rhd->setDescription( dsc ) ;
00056   return LCIO::SUCCESS ;
00057 }
00058 int lcrhdaddactivesubdetector( PTRTYPE runHeader, const char* adn){
00059   LCRunHeaderImpl* rhd =  reinterpret_cast<LCRunHeaderImpl*>(runHeader) ;
00060   rhd->addActiveSubdetector( adn ) ;
00061   return LCIO::SUCCESS ;
00062 }
00063 
00064 
00065 
00066 

Generated on Mon Jan 7 13:15:21 2013 for MicromegasFramework by  doxygen 1.4.7