Index: trunk/psModules/src/concepts/pmConceptsWrite.h
===================================================================
--- trunk/psModules/src/concepts/pmConceptsWrite.h	(revision 22699)
+++ trunk/psModules/src/concepts/pmConceptsWrite.h	(revision 23428)
@@ -20,47 +20,62 @@
 /// @{
 
-/// "Write" concepts to (actually, check against) the camera format file's CELLS.
+/// "Write" concept to (actually, check against) the camera format file's CELLS.
 ///
 /// Examines the CELLS metadata in the camera format file for the current type of cell, and checks that the
-/// concepts as defined there match the ones defined in the cell.  A warning is produced if the concepts do
+/// concept as defined there match the ones defined in the cell.  A warning is produced if the concept does
 /// not match.
-bool p_pmConceptsWriteToCells(const psMetadata *specs, ///< The concept specifications
+bool p_pmConceptWriteToCells(const pmCell *cell, ///< The cell
+                             const pmConceptSpec *spec, ///< Concept specification
+                             const psMetadataItem *conceptItem, ///< Concept to write
+                             const psMetadata *format ///< Camera format, or NULL
+    );
+
+/// "Write" concept to (actually, check against) the camera format file's DEFAULTS.
+///
+/// Examines the DEFAULTS metadata in the camera format file, and checks that the concept as defined there
+/// match the one defined in the cell.  A warning is produced if the concept does not match.
+bool p_pmConceptWriteToDefaults(const pmFPA *fpa, ///< The FPA
+                                const pmChip *chip, ///< The chip
+                                const pmCell *cell, ///< The cell
+                                const pmConceptSpec *spec, ///< Concept specification
+                                const psMetadataItem *conceptItem,      ///< Concept to write
+                                const psMetadata *format, ///< Camera format, or NULL
+                                const psMetadata *defaults ///< DEFAULTS configuration, or NULL
+    );
+
+/// "Write" concept to (actually, add to, pending a later write) the FITS header.
+///
+/// Examines the FITS header TRANSLATION metadata in the camera format file, and writes concept to the
+/// appropriate FITS header(s) in the HDU, in preparation for a future write of the HDU.
+bool p_pmConceptWriteToHeader(const pmFPA *fpa, ///< The FPA
+                              const pmChip *chip, ///< The chip
                               const pmCell *cell, ///< The cell
-                              const psMetadata *concepts ///< The concepts
-                             );
+                              const pmConceptSpec *spec, ///< Concept specification
+                              const psMetadataItem *conceptItem, ///< Concept to write
+                              const psMetadata *format, ///< Camera format, or NULL
+                              const psMetadata *translation ///< TRANSLATION configuration, or NULL
+                              );
 
-/// "Write" concepts to (actually, check against) the camera format file's DEFAULTS.
+/// Write concept to the database.
 ///
-/// Examines the DEFAULTS metadata in the camera format file, and checks that the concepts as defined there
-/// match the ones defined in the cell.  A warning is produced if the concepts do not match.
-bool p_pmConceptsWriteToDefaults(const psMetadata *specs, ///< The concept specifications
-                                 const pmFPA *fpa, ///< The FPA
-                                 const pmChip *chip, ///< The chip
-                                 const pmCell *cell, ///< The cell
-                                 const psMetadata *concepts ///< The concepts
+/// Examines the DATABASE metadata in the camera format file, and writes (actually, check against)
+/// concept to the database.
+bool p_pmConceptWriteToDatabase(const pmFPA *fpa, ///< The FPA
+                                const pmChip *chip, ///< The chip
+                                const pmCell *cell, ///< The cell
+                                pmConfig *config, ///< Configuration
+                                const pmConceptSpec *spec, ///< Concept specification
+                                const psMetadataItem *conceptItem, ///< Concept to write
+                                const psMetadata *format, ///< Camera format, or NULL
+                                const psMetadata *database ///< DATABASE configuration, or NULL
                                 );
 
-/// "Write" concepts to (actually, add to, pending a later write) the FITS header.
-///
-/// Examines the FITS header TRANSLATION metadata in the camera format file, and writes concepts to the
-/// appropriate FITS headers in the HDU, in preparation for a future write of the HDU.
-bool p_pmConceptsWriteToHeader(const psMetadata *specs, ///< The concept specifications
-                               const pmFPA *fpa, ///< The FPA
-                               const pmChip *chip, ///< The chip
-                               const pmCell *cell, ///< The cell
-                               const psMetadata *concepts ///< The concepts
-                              );
 
-/// Write concepts to the database.
-///
-/// Examines the DATABASE metadata in the camera format file, and writes concepts to the database.
-/// Warning: This function has not been tested; use at your own risk.
-bool p_pmConceptsWriteToDatabase(const psMetadata *specs, ///< The concept specifications
-                                 const pmFPA *fpa, ///< The FPA
-                                 const pmChip *chip, ///< The chip
-                                 const pmCell *cell, ///< The cell
-                                 pmConfig *config,///< Configuration
-                                 const psMetadata *concepts ///< The concepts
-                                );
+bool pmConceptWriteSingle(const pmFPA *fpa, ///< The FPA
+                          const pmChip *chip, ///< The chip
+                          const pmCell *cell, ///< The cell
+                          pmConfig *config, ///< Configuration
+                          const psMetadataItem *concept ///< Concept to write
+    );
 
 
@@ -70,5 +85,4 @@
 /// written for all lower levels by iterating over the components.
 bool pmConceptsWriteFPA(const pmFPA *fpa,     ///< FPA for which to write concepts
-                        pmConceptSource source, ///< Source for concepts
                         bool propagateDown, ///< Propagate to lower levels?
                         pmConfig *config        ///< Configuration
@@ -80,5 +94,4 @@
 /// written for the FPA, and the cell level by iterating over the components.
 bool pmConceptsWriteChip(const pmChip *chip,  ///< Chip for which to write concepts
-                         pmConceptSource source, ///< Source for concepts
                          bool propagateUp,///< Propagate to higher levels?
                          bool propagateDown, ///< Propagate to lower levels?
@@ -92,5 +105,4 @@
 /// only the parent of this cell).
 bool pmConceptsWriteCell(const pmCell *cell,  ///< FPA for which to write concepts
-                         pmConceptSource source, ///< Source for concepts
                          bool propagateUp, ///< Propagate to higher levels?
                          pmConfig *config ///< Configuration
