+
+//---------------------------------------------------------------
+
+void AliITSDCSAnalyzerSDD::Export( char *outputDCSFileName )
+{
+// Exports all stored AliITSDCSDataSDD type object into specified root file. Objects are named as
+//
+// DCSDataSDD_module<number>
+//
+// where <number> is in range 0..256 and it is obtained by calling
+//
+// AliITSgeomTGeo::GetModuleIndex( layer, ladder, moduleInLadder ) - 240
+
+ TFile * newFile = new TFile( outputDCSFileName, "RECREATE" );
+ if( newFile == NULL )
+ { // Creates .root file with specified name. if it is not possible,
+ // warning is displayed and exporting aborted.
+ AliWarning( Form( "Cannot create %s - export aborted ", outputDCSFileName ) );
+ return;
+ } /*if*/
+
+ newFile->cd();
+
+ char buffer[100];
+
+ for( Int_t moduleLoop = 0; moduleLoop < kNmodules; moduleLoop++ )
+ { // loops through all modules and writes appropriate object into the file
+ sprintf( buffer, "DCSDataSDD_module%i", moduleLoop );
+ if( fDCSData[moduleLoop] ) fDCSData[moduleLoop]->Write( buffer, TObject::kSingleKey );
+ } /*for( moduleLoop )*/
+
+ newFile->Close();
+ delete newFile;
+
+} /*AliITSDCSAnalyzerSDD::Export*/